Fix compiler warnings. Bug #504701.
authorChristian Persch <chpe@src.gnome.org>
Sun, 23 Dec 2007 12:37:13 +0000 (12:37 +0000)
committerChristian Persch <chpe@src.gnome.org>
Sun, 23 Dec 2007 12:37:13 +0000 (12:37 +0000)
svn path=/trunk/; revision=19229

ChangeLog
modules/other/gail/gailcell.c
modules/other/gail/gailcontainercell.c
modules/other/gail/gailexpander.c
modules/other/gail/gailtextcell.c
modules/other/gail/gailtextview.c
modules/other/gail/gailwindow.c

index bac2fa25db0d8d3e8ac3e16465bc5d358d0bd669..c57697af4e7e5042741846945fef44a0c4f02c4a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2007-12-22  Christian Persch  <chpe@gnome.org>
+
+       * modules/other/gail/gailcell.c:
+       * modules/other/gail/gailcontainercell.c:
+       * modules/other/gail/gailexpander.c:
+       * modules/other/gail/gailtextcell.c:
+       * modules/other/gail/gailtextview.c:
+       * modules/other/gail/gailwindow.c: Fix compile warnings. Bug #504701.
+
 2007-12-22  Christian Persch  <chpe@gnome.org>
 
        * modules/other/gail/*.c: Include config.h. Bug #504720.
index 32f922743e1164b65e0fd182862bcda814e9f426..9a8849138d70bf19b469465043f31ccb29f6d20b 100644 (file)
@@ -19,6 +19,7 @@
 
 #include <config.h>
 
+#include <string.h>
 #include <stdlib.h>
 #include <gtk/gtk.h>
 #include "gailcontainercell.h"
@@ -359,7 +360,7 @@ gail_cell_remove_action_by_name (GailCell    *cell,
   for (list_node = cell->action_list; list_node && !action_found; 
                     list_node = list_node->next)
     {
-      if (!g_strcasecmp (((ActionInfo *)(list_node->data))->name, action_name))
+      if (!strcmp (((ActionInfo *)(list_node->data))->name, action_name))
        {
          action_found = TRUE;
          break;
index d85f153f82b7d4ab68891406e558cc0d93e78759..8cf2ded515063f548941b1d55149e3a0b2a6000c 100644 (file)
@@ -119,7 +119,7 @@ gail_container_cell_remove_child (GailContainerCell *container,
   g_return_if_fail (GAIL_IS_CELL(child));
   g_return_if_fail (container->NChildren > 0);
 
-  g_list_remove (container->children, (gpointer) child);
+  container->children = g_list_remove (container->children, (gpointer) child);
   _gail_container_cell_recompute_child_indices (container);
   container->NChildren--;
 }
index a68e98638857d346605c3b5f454d7d4959d59212..006e95f87a658f7960569438c7f9152982705dde 100644 (file)
@@ -209,7 +209,7 @@ gail_expander_get_n_children (AtkObject* obj)
   /* See if there is a label - if there is, reduce our count by 1
    * since we don't want the label included with the children.
    */
-  if (gtk_expander_get_label_widget (widget))
+  if (gtk_expander_get_label_widget (GTK_EXPANDER (widget)))
     count -= 1;
 
   return count; 
@@ -237,7 +237,7 @@ gail_expander_ref_child (AtkObject *obj,
   /* See if there is a label - if there is, we need to skip it
    * since we don't want the label included with the children.
    */
-  label = gtk_expander_get_label_widget (widget);
+  label = gtk_expander_get_label_widget (GTK_EXPANDER (widget));
   if (label) {
     count = g_list_length (children);
     for (index = 0; index <= i; index++) {
index eaa774f9083b5f2aa3623de94ee09958597b52e9..d564c04f99a1a1edcc63dc3a123b5a420198371b 100644 (file)
@@ -17,6 +17,8 @@
  * Boston, MA 02111-1307, USA.
  */
 
+#include <config.h>
+#include <string.h>
 #include <gtk/gtk.h>
 #include "gailtextcell.h"
 #include "gailcontainercell.h"
@@ -221,7 +223,7 @@ gail_text_cell_update_cache (GailRendererCell *cell,
       * value has changed.
       */
       if (new_cache == NULL ||
-          g_strcasecmp (text_cell->cell_text, new_cache))
+          strcmp (text_cell->cell_text, new_cache))
         {
           g_free (text_cell->cell_text);
           temp_length = text_cell->cell_length;
index 10d81ed8968624512091fb1b80bb7d59672b56dc..8ce7f8c54ea4ade0b9ed46488f7513398b3725cc 100644 (file)
@@ -1016,65 +1016,65 @@ gail_text_view_set_run_attributes (AtkEditableText *text,
       name = at->name;
       value = at->value;
 
-      if (!g_strcasecmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_LEFT_MARGIN)))
+      if (!strcmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_LEFT_MARGIN)))
         g_object_set (G_OBJECT (tag), "left_margin", atoi (value), NULL);
 
-      else if (!g_strcasecmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_RIGHT_MARGIN)))
+      else if (!strcmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_RIGHT_MARGIN)))
         g_object_set (G_OBJECT (tag), "right_margin", atoi (value), NULL);
 
-      else if (!g_strcasecmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_INDENT)))
+      else if (!strcmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_INDENT)))
         g_object_set (G_OBJECT (tag), "indent", atoi (value), NULL);
 
-      else if (!g_strcasecmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_PIXELS_ABOVE_LINES)))
+      else if (!strcmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_PIXELS_ABOVE_LINES)))
         g_object_set (G_OBJECT (tag), "pixels_above_lines", atoi (value), NULL);
 
-      else if (!g_strcasecmp(name, atk_text_attribute_get_name (ATK_TEXT_ATTR_PIXELS_BELOW_LINES)))
+      else if (!strcmp(name, atk_text_attribute_get_name (ATK_TEXT_ATTR_PIXELS_BELOW_LINES)))
         g_object_set (G_OBJECT (tag), "pixels_below_lines", atoi (value), NULL);
 
-      else if (!g_strcasecmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_PIXELS_INSIDE_WRAP)))
+      else if (!strcmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_PIXELS_INSIDE_WRAP)))
         g_object_set (G_OBJECT (tag), "pixels_inside_wrap", atoi (value), NULL);
 
-      else if (!g_strcasecmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_SIZE)))
+      else if (!strcmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_SIZE)))
         g_object_set (G_OBJECT (tag), "size", atoi (value), NULL);
 
-      else if (!g_strcasecmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_RISE)))
+      else if (!strcmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_RISE)))
         g_object_set (G_OBJECT (tag), "rise", atoi (value), NULL);
 
-      else if (!g_strcasecmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_WEIGHT)))
+      else if (!strcmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_WEIGHT)))
         g_object_set (G_OBJECT (tag), "weight", atoi (value), NULL);
 
-      else if (!g_strcasecmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_BG_FULL_HEIGHT)))
+      else if (!strcmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_BG_FULL_HEIGHT)))
         {
           g_object_set (G_OBJECT (tag), "bg_full_height", 
-                   (g_strcasecmp (value, atk_text_attribute_get_value (ATK_TEXT_ATTR_BG_FULL_HEIGHT, 0))),
+                   (strcmp (value, atk_text_attribute_get_value (ATK_TEXT_ATTR_BG_FULL_HEIGHT, 0))),
                    NULL);
         }
 
-      else if (!g_strcasecmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_LANGUAGE)))
+      else if (!strcmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_LANGUAGE)))
         g_object_set (G_OBJECT (tag), "language", value, NULL);
 
-      else if (!g_strcasecmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_FAMILY_NAME)))
+      else if (!strcmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_FAMILY_NAME)))
         g_object_set (G_OBJECT (tag), "family", value, NULL);
 
-      else if (!g_strcasecmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_EDITABLE)))
+      else if (!strcmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_EDITABLE)))
         {
           g_object_set (G_OBJECT (tag), "editable", 
-                   (g_strcasecmp (value, atk_text_attribute_get_value (ATK_TEXT_ATTR_EDITABLE, 0))),
+                   (strcmp (value, atk_text_attribute_get_value (ATK_TEXT_ATTR_EDITABLE, 0))),
                    NULL);
         }
 
-      else if (!g_strcasecmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_INVISIBLE)))
+      else if (!strcmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_INVISIBLE)))
         {
           g_object_set (G_OBJECT (tag), "invisible", 
-                   (g_strcasecmp (value, atk_text_attribute_get_value (ATK_TEXT_ATTR_EDITABLE, 0))),
+                   (strcmp (value, atk_text_attribute_get_value (ATK_TEXT_ATTR_EDITABLE, 0))),
                    NULL);
         }
 
-      else if (!g_strcasecmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_UNDERLINE)))
+      else if (!strcmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_UNDERLINE)))
         {
           for (j = 0; j < 3; j++)
             {
-              if (!g_strcasecmp (value, atk_text_attribute_get_value (ATK_TEXT_ATTR_UNDERLINE, j)))
+              if (!strcmp (value, atk_text_attribute_get_value (ATK_TEXT_ATTR_UNDERLINE, j)))
                 {
                   g_object_set (G_OBJECT (tag), "underline", j, NULL);
                   break;
@@ -1082,14 +1082,14 @@ gail_text_view_set_run_attributes (AtkEditableText *text,
             } 
         }
 
-      else if (!g_strcasecmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_STRIKETHROUGH)))
+      else if (!strcmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_STRIKETHROUGH)))
         {
           g_object_set (G_OBJECT (tag), "strikethrough", 
-                   (g_strcasecmp (value, atk_text_attribute_get_value (ATK_TEXT_ATTR_STRIKETHROUGH, 0))),
+                   (strcmp (value, atk_text_attribute_get_value (ATK_TEXT_ATTR_STRIKETHROUGH, 0))),
                    NULL);
         }
 
-      else if (!g_strcasecmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_BG_COLOR)))
+      else if (!strcmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_BG_COLOR)))
         {
           RGB_vals = g_strsplit (value, ",", 3);
           color = g_malloc (sizeof (GdkColor));
@@ -1099,7 +1099,7 @@ gail_text_view_set_run_attributes (AtkEditableText *text,
           g_object_set (G_OBJECT (tag), "background_gdk", color, NULL);
         }
   
-      else if (!g_strcasecmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_FG_COLOR)))
+      else if (!strcmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_FG_COLOR)))
         {
           RGB_vals = g_strsplit (value, ",", 3);
           color = g_malloc (sizeof (GdkColor));
@@ -1109,11 +1109,11 @@ gail_text_view_set_run_attributes (AtkEditableText *text,
           g_object_set (G_OBJECT (tag), "foreground_gdk", color, NULL);
         }
 
-      else if (!g_strcasecmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_STRETCH)))
+      else if (!strcmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_STRETCH)))
         {
           for (j = 0; j < 9; j++)
             {
-              if (!g_strcasecmp (value, atk_text_attribute_get_value (ATK_TEXT_ATTR_STRETCH, j)))
+              if (!strcmp (value, atk_text_attribute_get_value (ATK_TEXT_ATTR_STRETCH, j)))
                 {
                   g_object_set (G_OBJECT (tag), "stretch", j, NULL);
                   break;
@@ -1121,11 +1121,11 @@ gail_text_view_set_run_attributes (AtkEditableText *text,
             }
         }
 
-      else if (!g_strcasecmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_JUSTIFICATION)))
+      else if (!strcmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_JUSTIFICATION)))
         {
           for (j = 0; j < 4; j++)
             {
-              if (!g_strcasecmp (value, atk_text_attribute_get_value (ATK_TEXT_ATTR_JUSTIFICATION, j)))
+              if (!strcmp (value, atk_text_attribute_get_value (ATK_TEXT_ATTR_JUSTIFICATION, j)))
                 {
                   g_object_set (G_OBJECT (tag), "justification", j, NULL);
                   break;
@@ -1133,11 +1133,11 @@ gail_text_view_set_run_attributes (AtkEditableText *text,
             }
         }
 
-      else if (!g_strcasecmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_DIRECTION)))
+      else if (!strcmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_DIRECTION)))
         {
           for (j = 0; j < 3; j++)
             {
-              if (!g_strcasecmp (value, atk_text_attribute_get_value (ATK_TEXT_ATTR_DIRECTION, j)))
+              if (!strcmp (value, atk_text_attribute_get_value (ATK_TEXT_ATTR_DIRECTION, j)))
                 {
                   g_object_set (G_OBJECT (tag), "direction", j, NULL);
                   break;
@@ -1145,11 +1145,11 @@ gail_text_view_set_run_attributes (AtkEditableText *text,
             }
         }
 
-      else if (!g_strcasecmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_VARIANT)))
+      else if (!strcmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_VARIANT)))
         {
           for (j = 0; j < 2; j++)
             {
-              if (!g_strcasecmp (value, atk_text_attribute_get_value (ATK_TEXT_ATTR_VARIANT, j)))
+              if (!strcmp (value, atk_text_attribute_get_value (ATK_TEXT_ATTR_VARIANT, j)))
                 {
                   g_object_set (G_OBJECT (tag), "variant", j, NULL);
                   break;
@@ -1157,11 +1157,11 @@ gail_text_view_set_run_attributes (AtkEditableText *text,
             }
         }
 
-      else if (!g_strcasecmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_WRAP_MODE)))
+      else if (!strcmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_WRAP_MODE)))
         {
           for (j = 0; j < 3; j++)
             {
-              if (!g_strcasecmp (value, atk_text_attribute_get_value (ATK_TEXT_ATTR_WRAP_MODE, j)))
+              if (!strcmp (value, atk_text_attribute_get_value (ATK_TEXT_ATTR_WRAP_MODE, j)))
                 {
                   g_object_set (G_OBJECT (tag), "wrap_mode", j, NULL);
                   break;
@@ -1169,11 +1169,11 @@ gail_text_view_set_run_attributes (AtkEditableText *text,
             }
         }
 
-      else if (!g_strcasecmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_STYLE)))
+      else if (!strcmp (name, atk_text_attribute_get_name (ATK_TEXT_ATTR_STYLE)))
         {
           for (j = 0; j < 3; j++)
             {
-              if (!g_strcasecmp (value, atk_text_attribute_get_value (ATK_TEXT_ATTR_STYLE, j)))
+              if (!strcmp (value, atk_text_attribute_get_value (ATK_TEXT_ATTR_STYLE, j)))
                 {
                   g_object_set (G_OBJECT (tag), "style", j, NULL);
                   break;
@@ -1724,8 +1724,8 @@ static GIOChannel*       gail_streamable_content_get_stream       (AtkStreamable
            gtk_text_buffer_get_iter_at_offset (buffer, &end, -1);
            if (!strcmp ("text/plain", mime_type)) 
            {
-               cbuf = gtk_text_buffer_get_text (buffer, &start, &end, FALSE);
-               len = strlen (cbuf); 
+               cbuf = (guint8*) gtk_text_buffer_get_text (buffer, &start, &end, FALSE);
+               len = strlen ((const char *) cbuf); 
            }
            else
            {
@@ -1735,7 +1735,7 @@ static GIOChannel*       gail_streamable_content_get_stream       (AtkStreamable
            fd = g_mkstemp (tname);
            gio = g_io_channel_unix_new (fd);
            g_io_channel_set_encoding (gio, NULL, &err);
-           if (!err) g_io_channel_write_chars (gio, cbuf, (gssize) len, &written, &err);
+           if (!err) g_io_channel_write_chars (gio, (const char *) cbuf, (gssize) len, &written, &err);
            else g_message (err->message);
            if (!err) g_io_channel_seek_position (gio, 0, G_SEEK_SET, &err);
            else g_message (err->message);
index 14dbdb6cd145b4a3ad0d22c932fc493ba4589958..4a35c3c939721aacac079089e14d0c551361edae 100644 (file)
@@ -317,7 +317,7 @@ gail_window_get_name (AtkObject *accessible)
                     {
                       GList *children;
                       guint count;
-                      children = gtk_container_get_children (child);
+                      children = gtk_container_get_children (GTK_CONTAINER (child));
                       count = g_list_length (children);
                       if (count == 2) 
                         {